//
// Source code recreated from a .class file by IntelliJ IDEA
// (powered by FernFlower decompiler)
//

package com.orphan.supplier.vo;

import com.orphan.supplier.po.Goods;
import lombok.Data;

@Data
public class GoodsVO {
    private String goodsName;
    private String tenderStatus;
    private Integer callAmount;
    private Integer providedAmount;
    private String tenderNumber;
    private String tenderCallNumber;
    private double price;
    private int goodsNumber;

    public GoodsVO(Goods g,String tenderCallNumber) {
        this.tenderCallNumber = tenderCallNumber;
        this.goodsName = g.getName();
        this.callAmount = g.getQuantity();
        this.tenderStatus = "未投标";
        this.goodsNumber = g.getId();
    }

    public void setTenderStatus(int status,int amount,String tenderNumber,String tenderCallNumber,double price) {
        this.providedAmount = amount;
        this.price = price;
        if (status == 0) {
            this.tenderStatus = "已投标";
        } else if (status == 1) {
            this.tenderStatus = "已中标";
        } else {
            this.tenderStatus = "未中标";
        }
        this.tenderNumber = tenderNumber;
        this.tenderCallNumber = tenderCallNumber;
    }

    public String getGoodsName() {
        return this.goodsName;
    }

    public String getTenderStatus() {
        return this.tenderStatus;
    }

    public Integer getCallAmount() {
        return this.callAmount;
    }

    public Integer getProvidedAmount() {
        return this.providedAmount;
    }

    public void setGoodsName(String goodsName) {
        this.goodsName = goodsName;
    }

    public void setCallAmount(Integer callAmount) {
        this.callAmount = callAmount;
    }

    public void setProvidedAmount(Integer providedAmount) {
        this.providedAmount = providedAmount;
    }

    public boolean equals(Object o) {
        if (o == this) {
            return true;
        } else if (!(o instanceof GoodsVO)) {
            return false;
        } else {
            GoodsVO other = (GoodsVO)o;
            if (!other.canEqual(this)) {
                return false;
            } else {
                label59: {
                    Object this$callAmount = this.getCallAmount();
                    Object other$callAmount = other.getCallAmount();
                    if (this$callAmount == null) {
                        if (other$callAmount == null) {
                            break label59;
                        }
                    } else if (this$callAmount.equals(other$callAmount)) {
                        break label59;
                    }

                    return false;
                }

                Object this$providedAmount = this.getProvidedAmount();
                Object other$providedAmount = other.getProvidedAmount();
                if (this$providedAmount == null) {
                    if (other$providedAmount != null) {
                        return false;
                    }
                } else if (!this$providedAmount.equals(other$providedAmount)) {
                    return false;
                }

                Object this$goodsName = this.getGoodsName();
                Object other$goodsName = other.getGoodsName();
                if (this$goodsName == null) {
                    if (other$goodsName != null) {
                        return false;
                    }
                } else if (!this$goodsName.equals(other$goodsName)) {
                    return false;
                }

                Object this$tenderStatus = this.getTenderStatus();
                Object other$tenderStatus = other.getTenderStatus();
                if (this$tenderStatus == null) {
                    if (other$tenderStatus != null) {
                        return false;
                    }
                } else if (!this$tenderStatus.equals(other$tenderStatus)) {
                    return false;
                }

                return true;
            }
        }
    }

    protected boolean canEqual(Object other) {
        return other instanceof GoodsVO;
    }


    public String toString() {
        String var10000 = this.getGoodsName();
        return "GoodsVO(goodsName=" + var10000 + ", tenderStatus=" + this.getTenderStatus() + ", callAmount=" + this.getCallAmount() + ", providedAmount=" + this.getProvidedAmount() + ")";
    }
}
